package org.github.manx98.jlibhac.tools.ncm;

/**
 * @author Manx98
 * @version 1.0
 * @since 2022/10/6 18:19
 */
public enum ContentMetaType {
    SystemProgram(1),
    SystemData(2),
    SystemUpdate(3),
    BootImagePackage(4),
    BootImagePackageSafe(5),
    Application(0x80),
    Patch(0x81),
    AddOnContent(0x82),
    Delta(0x83);
    public final byte value;
    ContentMetaType(int type) {
        this.value = (byte) type;
    }

    public static ContentMetaType valueOf(byte type) {
        for (ContentMetaType value : values()) {
            if (value.value == type) {
                return value;
            }
        }
        throw new IllegalArgumentException("Unknown ContentMetaType value: " + type);
    }
}
